package com.changgou.goods.controller;

import com.changgou.util.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：lizimo
 * @date ：Created in 2020/2/16
 * @description ：
 * @version: 1.0
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private IdWorker idWorker;

    @GetMapping("/createId")
    public Long createId() {
        return idWorker.nextId();
    }
}
